import util from '../libs/util';
var qs = require('qs');

//获取省份
export function getProvinces(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/mdata/provinces',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//获取城市
export function getCity(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/mdata/cities',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//车辆信息(根据车牌号查询)
export function vehicleInfoByLicenseNo(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/vehicleInfoByLicenseNo',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//车型信息
export function modelExactness(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/modelExactness',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//险别查询
export function risks(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/mdata/risks',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//保险公司支持的地区
export function getAreas(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/mdata/areas',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//地区支持的保险公司
export function insurers(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/mdata/insurers',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}


//获取投保起期
export function effectiveDate(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/assist/effectiveDate',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//精准报价
export function exactnessQuote(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/main/exactnessQuote',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//续保信息接口
export function renewInfo(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/assist/renewInfo',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//申请核保
export function applyUnderwrite(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/main/applyUnderwrite',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//保险公司投保声明
export function statement(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/assist/statement',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//模糊匹配车型
export function modelMistiness(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/modelMistiness',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}


//保存客户信息
export function saveInsurance(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/insurance',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}


//付款成功修改状态
export function payBack(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/insurance/callback',
        method: 'get',
        params:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}


//查询单个保单
export function getOrder(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/insurance/'+value,
        method: 'get',
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}


//获取支付链接
export function getPayLink(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/payment/payLink',
        method: 'post',
        data:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}

//获取订单列表
export function getInsurance(value) {
    return util.ajax({
        url: 'https://online.kuaibao365.com/api/auto/insurance',
        method: 'get',
        params:value,
        headers: {
            "Content-Type": "application/json; charset=UTF-8"
        }
    })
}